package ${packageName};

import android.app.Dialog;
import android.view.WindowManager;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.zxn.presenter.view.BaseDialogFragment;
<#if applicationPackage??>

import ${applicationPackage}.R;
</#if>

/**
 * Created by zxn on ${.now}.
 * 
 */
public class ${className} extends BaseDialogFragment {
<#if includeFactory>
    private static final String ARG_PARAM1 = "param1";

    private String mParam1;

</#if>


<#if includeFactory>
    
    public static ${className} newInstance(String param1) {
        ${className} fragment = new ${className}();
        Bundle args = new Bundle();
        args.putString(ARG_PARAM1, param1);
        fragment.setArguments(args);
        return fragment;
    }

    public static ${className} newInstance() {
        ${className} fragment = new ${className}();
        return fragment;
    }
</#if>
    public ${className}() {
    }

<#if includeFactory>
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            mParam1 = getArguments().getString(ARG_PARAM1);
        }
    }
</#if>

	@Override
    protected void onDialogCreated(WindowManager.LayoutParams params, Dialog dialog) {
        super.onDialogCreated(params, dialog);
        
    }

    @Override
    protected int getLayoutResId() {
        <#if includeLayout>
        return R.layout.${fragmentName};
		<#else>
        return 0;
		</#if>
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
    }

    @Override
    protected int initTheme() {
    	//return R.style.BaseDialog_FullScreen;
        return R.style.BaseDialog_Nice;
    }
}
